{% extends "base.html" %}
{% block title %}投票列表{% endblock %}
{% block content %}
{% if info %}
    <p>{{info}}</p>
{% endif %}
{% if vote_list %}
    <table class="table">
        <thead><tr><td>#</td><td>名称</td><td>进入</td></tr></thead>
        <tbody>
         {% for vote in vote_list %}
        <tr>
            <td>{{ vote.id }}</td><td>{{ vote.title }}</td>

            <td><a href="{% url 'get_vote'  vote.id %}"> 数据</a>｜
                <a href="{% url 'get_map'  vote.id %}"> 地图</a> ｜
                <a href="{% url 'vote_page'  vote.id %}"> 投票页面</a> ｜
            </td>
        </tr>

        {% endfor %}
        </tbody>
    </table>
     {% if is_paginated %}
    <div class="pagination">
        <span class="page-links">
            {% if page_obj.has_previous %}
                <a href="/project?page={{ page_obj.previous_page_number }}">上一页</a>
            {% endif %}
            {% if page_obj.has_next %}
                <a href="/project?page={{ page_obj.next_page_number }}">下一页</a>
            {% endif %}
            <span class="page-current">
                第{{ page_obj.number }}页 ，共{{ page_obj.paginator.num_pages }}页。
            </span>
        </span>
    </div>
    {%endif%}
{% else %}
    <p>没有</p>
{% endif %}
<hr>
{% endblock%}